From: Richard M. Stallman Date: Tue, 19 Apr 1994 00:17:46 +0000 (+0000) Subject: (readline): When extending the buffer, X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~92108 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=1ddb69784baaf29d8a6c45c8c3be7446e7367aea;p=emacs.git (readline): When extending the buffer, calculate end afresh using the new size. --- diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c index 252a7b2ad5b..1e5bf53ed47 100644 --- a/lib-src/fakemail.c +++ b/lib-src/fakemail.c @@ -217,7 +217,7 @@ readline (linebuffer, stream) linebuffer->size *= 2; buffer = ((char *) xrealloc (buffer, linebuffer->size)); p += buffer - linebuffer->buffer; - end += buffer - linebuffer->buffer; + end = buffer + linebuffer->size; linebuffer->buffer = buffer; } if (c < 0 || c == '\n')